package com.yyl.fmall.product.service.impl;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yyl.fmall.product.entity.ProductParams;
import com.yyl.fmall.product.mapper.ProductParamsMapper;
import com.yyl.fmall.product.service.IProductParamsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 商品参数  服务实现类
 * </p>
 *
 * @author YuanSir
 * @since 2022-11-07
 */
@Service
public class ProductParamsServiceImpl extends ServiceImpl<ProductParamsMapper, ProductParams> implements IProductParamsService {
    
    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public ProductParams getDetailParams(String productId) {
        return getOne(new LambdaQueryWrapper<ProductParams>()
                .eq(ProductParams::getProductId, productId));
    }
}
